
VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "SH_Parts"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Private Sub Worksheet_Change(ByVal Target As Range)
  Select Case Target.Address
    Case "$B$7":  Skvoz "lp", Target
    Case "$B$9":  Skvoz "lw", Target
    Case "$B$11": Skvoz "pw", Target
    Case "$B$5"
      vList = [B5].Validation.Formula1 'топорное выяснение номера списка
      tmp = Left(vList, InStr(vList, [B5]))
      cnt = Len(tmp) - Len(Replace(tmp, ";", ""))
      tmp = rwOpts("tc", cnt + 1) 'синхронизируем с настройками выбранный тип
  End Select
End Sub

Sub Skvoz(arg As String, Target As Range)
  tmp = rwOpts(arg, Target)
  Application.EnableEvents = 0
  Target.FormulaR1C1 = "=VLOOKUP(""" & arg & """,Opts!C[-1]:C,2,0)"
  Application.EnableEvents = 1
End Sub
